package com.study;

import com.study.common.GeneratePlugin;

/*生成代码*/
public class GenerateCode {
    private static final String PROJECT_PATH = "E:/generator";
    private static final String URL = "jdbc:mysql://localhost:3306/study?serverTimezone=Asia/Shanghai";
    private static final String USER_NAME = "root";
    private static final String PASSWORD = "123456";
    private static final String DRIVER_CLASS_NAME = "com.mysql.cj.jdbc.Driver";
    private static final String[] TABLE_PREFIX = new String[]{"t_"};
    private static final String[] INCLUDE_TABLE = new String[]{"t_class"};


    public static void main(String[] args) {
        GeneratePlugin generatePlugin = GeneratePlugin.build(
                PROJECT_PATH, URL, USER_NAME, PASSWORD,
                DRIVER_CLASS_NAME, TABLE_PREFIX, INCLUDE_TABLE);
        generatePlugin.setBasePackage(GenerateCode.class.getPackage().getName());
        generatePlugin.execute();
    }

}
